home *** CD-ROM | disk | FTP | other *** search
/ MacWarehouse Macintosh Games / MacWarehouse Macintosh Games.iso / AMBER demo / ROXY / ROXY.dxr / 00008_generic key-mouse handlers.ls < prev    next >
Encoding:
Text File  |  1996-10-18  |  18.5 KB  |  555 lines

  1. on mouseDown
  2.   startTimer()
  3.   if objectp(oPuppeteer) then
  4.     DoHotspots(oPuppeteer)
  5.   end if
  6. end
  7.  
  8. on keyDown
  9.   global oStoryteller, oPuppeteer, oUtility, gPsionSpins, gPsionFrames, gVoid, gDeferredTransit
  10.   if the keyDownScript <> EMPTY then
  11.     exit
  12.   end if
  13.   set passwordState to getState(oStoryteller, #PlayerIsUsingLaptop)
  14.   set frameStack to getProp(the lsMultiFrames of oPuppeteer, #passwordEntry)
  15.   if oUtility(mIsAlphaNum, the key) then
  16.     set alphaNum to 1
  17.   end if
  18.   if passwordState = #prompting then
  19.     killVideo()
  20.     if alphaNum = 1 then
  21.       setState(oStoryteller, #PlayerIsUsingLaptop, #password)
  22.       set passwordState to #password
  23.     else
  24.       setState(oStoryteller, #PlayerIsUsingLaptop, 0)
  25.       set passwordState to 0
  26.       updateDisplay(oPuppeteer)
  27.     end if
  28.   end if
  29.   if passwordState = #password then
  30.     set lsAttempt to getProp(the lsStateData of oStoryteller, #passwordAttempt)
  31.     set multiSprite to #none
  32.     repeat with i = 10 to 48
  33.       if getPos(frameStack, the castNum of sprite i) then
  34.         set multiSprite to i
  35.         exit repeat
  36.       end if
  37.     end repeat
  38.     if multiSprite = #none then
  39.       alert("keyDown: Whoa, something's really wrong here")
  40.       exit
  41.     end if
  42.     if (the key = ENTER) or (the key = RETURN) or (count(lsAttempt) > 5) then
  43.       cursorOff()
  44.       set rightAnswer to 0
  45.       if count(lsAttempt) = count(["W", "I", "S", "D", "O", "M"]) then
  46.         repeat with i = 1 to count(lsAttempt)
  47.           set testChar to getAt(lsAttempt, i)
  48.           if (getAt(["W", "I", "S", "D", "O", "M"], i) = testChar) or (getAt(["w", "i", "s", "d", "o", "m"], i) = testChar) then
  49.             set rightAnswer to 1
  50.             next repeat
  51.           end if
  52.           set rightAnswer to 0
  53.           exit repeat
  54.         end repeat
  55.       end if
  56.       if rightAnswer then
  57.         cursorOff()
  58.         setState(oStoryteller, #PlayerIsUsingLaptop, #startUp)
  59.         updateDisplay(oPuppeteer)
  60.         wait(#videoStop)
  61.         killVideo()
  62.         if getProp(the lsStateData of oStoryteller, #ghostsRemaining) = [] then
  63.           setState(oStoryteller, #PlayerIsUsingLaptop, 0)
  64.           setState(oStoryteller, #showMontage, 0)
  65.           goTo(#OfficeMonitor_PTsuite)
  66.           wait(90)
  67.           pushVideo()
  68.           wait(#videoStop)
  69.           killVideo()
  70.           loadMultiFrames(#BT_checkBox)
  71.           loadMultiFrames(#BT_align_left)
  72.           loadMultiFrames(#BT_align_right)
  73.           loadMultiFrames(#BT_bias1)
  74.           loadMultiFrames(#BT_bias2)
  75.           loadMultiFrames(#BT_bias3)
  76.           loadMultiFrames(#BT_psionFrames)
  77.           setState(oStoryteller, #BT_fragStatus, #spinningNow)
  78.           if gPsionSpins = [0, 0, 0] then
  79.             set gPsionFrames to gVoid
  80.           end if
  81.           goTo(#OfficeMonitor_alignment)
  82.         else
  83.           setState(oStoryteller, #PlayerIsUsingLaptop, #crashing)
  84.           updateDisplay(oPuppeteer)
  85.           wait(#videoStop)
  86.           setState(oStoryteller, #PlayerIsUsingLaptop, #crashed)
  87.           updateDisplay(oPuppeteer)
  88.         end if
  89.       else
  90.         set the castNum of sprite multiSprite to getAt(frameStack, count(frameStack))
  91.         updateStage()
  92.         wait(60)
  93.         setState(oStoryteller, #PlayerIsUsingLaptop, 0)
  94.         updateDisplay(oPuppeteer)
  95.         wait(15)
  96.         setState(oStoryteller, #PlayerIsUsingLaptop, #prompting)
  97.         updateDisplay(oPuppeteer)
  98.         set frustration to getState(oStoryteller, #passwordFrustration)
  99.         if integerp(frustration) then
  100.           set frustration to frustration + 1
  101.           setProp(the lsStateData of oStoryteller, #passwordFrustration, [frustration])
  102.           if (frustration mod 5) = 0 then
  103.             soundEffect(#bigHint)
  104.           end if
  105.         end if
  106.       end if
  107.       exit
  108.     end if
  109.     if the key = BACKSPACE then
  110.       if count(lsAttempt) then
  111.         deleteAt(lsAttempt, count(lsAttempt))
  112.       end if
  113.     end if
  114.     if alphaNum then
  115.       append(lsAttempt, the key)
  116.     else
  117.       nothing()
  118.     end if
  119.     set the castNum of sprite multiSprite to getAt(frameStack, count(lsAttempt) + 1)
  120.     updateStage()
  121.   end if
  122.   if the number of menus > 0 then
  123.     pass()
  124.     exit
  125.   end if
  126.   if the commandDown then
  127.     set foo to the key
  128.     if "01234567" contains foo then
  129.       do("set the soundLevel to " & foo)
  130.     end if
  131.     if "Qq" contains the key then
  132.       quitGame(oStoryteller)
  133.     end if
  134.     if "." contains the key then
  135.       quitGame(oStoryteller)
  136.     end if
  137.   end if
  138.   dontPassEvent()
  139. end
  140.  
  141. on setPlayerIsUsingLaptop suggestion
  142.   global oStoryteller, oPuppeteer
  143.   set newValue to #none
  144.   if suggestion = 0 then
  145.     purgeMultiframes(#passwordEntry)
  146.     unFreezeInventory()
  147.     killVideo()
  148.     set newValue to 0
  149.     setProp(the lsStateData of oStoryteller, #passwordAttempt, [])
  150.   end if
  151.   if suggestion = #prompting then
  152.     loadMultiFrames(#passwordEntry)
  153.     set newValue to #prompting
  154.   end if
  155.   if suggestion = #crashing then
  156.     set newValue to #crashing
  157.   end if
  158.   if suggestion = #crashed then
  159.     set newValue to #crashed
  160.   end if
  161.   if suggestion = #restart then
  162.     set newValue to #restart
  163.   end if
  164.   if suggestion = #off then
  165.     set newValue to #off
  166.     setProp(the lsStateData of oStoryteller, #passwordAttempt, [])
  167.     set the queuedSound of oPuppeteer to #computerOff
  168.   end if
  169.   if suggestion = #warmingUp then
  170.     set newValue to #warmingUp
  171.     soundEffect(#computerStart)
  172.   end if
  173.   if suggestion = #password then
  174.     freezeInventory()
  175.     set newValue to #password
  176.   end if
  177.   if suggestion = #startUp then
  178.     purgeMultiframes(#passwordEntry)
  179.     unFreezeInventory()
  180.     set newValue to #startUp
  181.   end if
  182.   if newValue <> #none then
  183.     setProp(the lsStateData of oStoryteller, #PlayerIsUsingLaptop, [newValue])
  184.   end if
  185. end
  186.  
  187. on setPlayerIsExaminingPhone suggestion
  188.   global oStoryteller
  189.   if suggestion = 0 then
  190.     endLoop(#phoneRoxy)
  191.     endLoop(#phoneDead)
  192.   else
  193.     endLoop(#phoneRinging)
  194.     setProp(the lsStateData of oStoryteller, #ghostlyPhoneCall, [#dontRingPlease])
  195.   end if
  196.   setProp(the lsStateData of oStoryteller, #playerIsExaminingPhone, [suggestion])
  197. end
  198.  
  199. on spawnGhostlyEvent
  200.   global oStoryteller, oPuppeteer
  201.   if getState(oStoryteller, #BarOnline) = 0 then
  202.     exit
  203.   end if
  204.   set currentLoc to getState(oStoryteller, #currentLocation)
  205.   set hauntList to getProp(the lsStateData of oStoryteller, #cameraFeedbackRemaining)
  206.   repeat with i in hauntList
  207.     if (i = #peekFakeout) or (i = #rightBehindYou) then
  208.     end if
  209.     if i = #ghostKnife then
  210.       set forbiddenLocations to [#DiningRmKitchenEntry2, #HallKitchenEntryOpen, #Ghse_D_S, #Ghse_D_W, #Ghse_E_W, #Ghse_P_KitchenDoorCU, #Ghse_P_KitchenEntry, #Ghse_P_KitchenDknobCU]
  211.       if (the gHotSublist of oPuppeteer <> #kitchen) and (getPos(forbiddenLocations, currentLoc) = 0) then
  212.         setState(oStoryteller, #PeekDisplay, #ghostKnife)
  213.         exit repeat
  214.       end if
  215.     end if
  216.     if i = #crazyLR then
  217.       set forbiddenLocations to [#HallLivingRmEntry, #HallNwall, #HallExit, #PorchDoorCU]
  218.       if (the gHotSublist of oPuppeteer <> #livingRm) and (the gHotSublist of oPuppeteer <> #study) and (getPos(forbiddenLocations, currentLoc) = 0) then
  219.         setState(oStoryteller, #PeekDisplay, #crazyLR)
  220.         exit repeat
  221.       end if
  222.     end if
  223.     if i = #crazyDR then
  224.       if (the gHotSublist of oPuppeteer <> #diningRm) and (currentLoc <> #KitchenDiningRmEntry) and (the gHotSublist of oPuppeteer <> #study) then
  225.         setState(oStoryteller, #PeekDisplay, #crazyDR)
  226.         exit repeat
  227.       end if
  228.     end if
  229.     if i = #KdKnob then
  230.       set forbiddenLocations to [#DiningRmKitchenEntry2, #HallKitchenEntryOpen, #Ghse_D_S, #Ghse_D_W, #Ghse_E_W, #Ghse_P_KitchenDoorCU, #Ghse_P_KitchenEntry, #Ghse_P_KitchenDknobCU]
  231.       if (the gHotSublist of oPuppeteer <> #kitchen) and (getPos(forbiddenLocations, currentLoc) = 0) then
  232.         setState(oStoryteller, #PeekDisplay, #KdKnob)
  233.         exit repeat
  234.       end if
  235.     end if
  236.     if i = #ghostlyKey then
  237.       if (the gHotSublist of oPuppeteer <> #MBR) and (currentLoc <> #UHallMasterBedrmEntry) then
  238.         setState(oStoryteller, #PeekDisplay, #ghostlyKey)
  239.         exit repeat
  240.       end if
  241.     end if
  242.     if i = #bloodBath then
  243.       if (the gHotSublist of oPuppeteer <> #Marg) and (currentLoc <> #UHallMargRoomEntry) then
  244.         setState(oStoryteller, #PeekDisplay, #bloodBath)
  245.         exit repeat
  246.       end if
  247.     end if
  248.   end repeat
  249. end
  250.  
  251. on grabberInit
  252.   global oGrabber, gRippleSize, gCPU
  253.   if objectp(oGrabber) then
  254.     oGrabber(mdispose)
  255.   end if
  256.   set totalRAM to the memorysize / 1024
  257.   if totalRAM >= 8000 then
  258.     preLoadCast(2428, 2451)
  259.     set gRippleSize to #large
  260.   else
  261.     if totalRAM >= 6000 then
  262.       preLoadCast(2453, 2472)
  263.       set gRippleSize to #small
  264.     else
  265.       return #lowRAM
  266.       exit
  267.     end if
  268.   end if
  269.   if gCPU = #PC then
  270.     return #creationFailed
  271.   end if
  272.   set oGrabber to StageToCast.XObj(mnew)
  273.   if objectp(oGrabber) then
  274.     return #OK
  275.   else
  276.     return #creationFailed
  277.   end if
  278. end
  279.  
  280. on ripple
  281.   global oGrabber, gLastRipple, gRippleSize, gOriginPoint
  282.   if the ticks < (gLastRipple + (3 * 60)) then
  283.     exit
  284.   end if
  285.   if not objectp(oGrabber) then
  286.     set rippleStatus to grabberInit()
  287.     if rippleStatus <> #OK then
  288.       exit
  289.     end if
  290.   end if
  291.   set rippleSprite to 37
  292.   puppetSprite(rippleSprite, 1)
  293.   set the ink of sprite rippleSprite to 9
  294.   if gRippleSize = #small then
  295.     set firstCastPos to 2453
  296.     set lastCastPos to 2471
  297.     set grabWidth to 96
  298.     set grabHeight to 96
  299.     set rippleTempo to 2
  300.   else
  301.     set firstCastPos to 2428
  302.     set lastCastPos to 2450
  303.     set grabWidth to 160
  304.     set grabHeight to 170
  305.     set rippleTempo to 1
  306.   end if
  307.   set clipRegion to rect(112, 80, 534, 356)
  308.   set leftOffset to random(the right of clipRegion - the left of clipRegion - (grabWidth + 2))
  309.   set leftEdge to the left of clipRegion + leftOffset
  310.   set topOffset to random(the bottom of clipRegion - the top of clipRegion - (grabWidth - 2))
  311.   set topEdge to the top of clipRegion + topOffset
  312.   set rippleClip to oGrabber(mGetHandle, leftEdge, topEdge, leftEdge + grabWidth, topEdge + grabHeight)
  313.   if not picturep(rippleClip) then
  314.     alert("errcode = " & rippleClip)
  315.     exit
  316.   end if
  317.   set the loc of sprite rippleSprite to point(leftEdge + (grabWidth / 2), topEdge + (grabHeight / 2))
  318.   set the loc of sprite rippleSprite to the loc of sprite rippleSprite + point(1, 1)
  319.   set the picture of cast firstCastPos to rippleClip
  320.   set the castNum of sprite rippleSprite to firstCastPos
  321.   set newPos to firstCastPos + 2
  322.   updateStage()
  323.   repeat while newPos <= lastCastPos
  324.     wait(rippleTempo)
  325.     move(cast (newPos - 2), newPos)
  326.     set the castNum of sprite rippleSprite to newPos
  327.     set newPos to newPos + 2
  328.     updateStage()
  329.   end repeat
  330.   move(cast lastCastPos, firstCastPos)
  331.   set the loc of sprite rippleSprite to point(-1000, -1000) + gOriginPoint
  332.   set gLastRipple to the ticks
  333. end
  334.  
  335. on rippleWord maskSeries
  336.   global oGrabber, gRippleSize, gOriginPoint
  337.   if not objectp(oGrabber) then
  338.     set rippleStatus to grabberInit()
  339.     if rippleStatus <> #OK then
  340.       exit
  341.     end if
  342.   end if
  343.   set rippleSprite to 37
  344.   puppetSprite(rippleSprite, 1)
  345.   set the ink of sprite rippleSprite to 9
  346.   if maskSeries = #chilling_j then
  347.     set wordSprite to 4
  348.     set wordLoc to point(169, 201)
  349.     set firstCastPos to 2359
  350.     set lastCastPos to 2385
  351.     set leftEdge to 97
  352.     set topEdge to 186
  353.     set grabWidth to 160
  354.     set grabHeight to 30
  355.     set rippleTempo to 2
  356.   end if
  357.   if maskSeries = #chilling_s then
  358.     set wordSprite to 4
  359.     set wordLoc to point(169, 201)
  360.     set firstCastPos to 2295
  361.     set lastCastPos to 2333
  362.     set leftEdge to 97
  363.     set topEdge to 186
  364.     set grabWidth to 140
  365.     set grabHeight to 30
  366.     set rippleTempo to 2
  367.   end if
  368.   puppetSprite(wordSprite, 1)
  369.   set the loc of sprite wordSprite to wordLoc
  370.   updateStage()
  371.   wait(60)
  372.   set rippleClip to oGrabber(mGetHandle, leftEdge, topEdge, leftEdge + grabWidth, topEdge + grabHeight)
  373.   if not picturep(rippleClip) then
  374.     alert("errcode = " & rippleClip)
  375.     exit
  376.   end if
  377.   set the loc of sprite rippleSprite to point(leftEdge + (grabWidth / 2), topEdge + (grabHeight / 2))
  378.   set the loc of sprite rippleSprite to the loc of sprite rippleSprite + point(1, 1)
  379.   set the picture of cast firstCastPos to rippleClip
  380.   set the castNum of sprite rippleSprite to firstCastPos
  381.   set newPos to firstCastPos + 2
  382.   updateStage()
  383.   repeat while newPos <= lastCastPos
  384.     set newBlendValue to max(0, 100 - ((lastCastPos - newPos) * 10))
  385.     wait(rippleTempo)
  386.     move(cast (newPos - 2), newPos)
  387.     set the castNum of sprite rippleSprite to newPos
  388.     set newPos to newPos + 2
  389.     updateStage()
  390.   end repeat
  391.   move(cast lastCastPos, firstCastPos)
  392.   set the loc of sprite rippleSprite to point(-1000, -1000) + gOriginPoint
  393. end
  394.  
  395. on assertEdwinGhost
  396.   global gCPU
  397.   if inState(#hauntsRemaining, #lakeGhost2) then
  398.     if (getState(oStoryteller, #playerHasCrowbar) = 0) or (inState(#hauntsRemaining, #lakeGhost) = 0) then
  399.       if gCPU = #PC then
  400.         suspendSounds(#fadeOut)
  401.       end if
  402.       pushVideo()
  403.       wait(#videoStop)
  404.       if gCPU = #PC then
  405.         restoreSounds(#fadeIn)
  406.       end if
  407.       trimState(#hauntsRemaining, #lakeGhost2)
  408.     end if
  409.   end if
  410. end
  411.  
  412. on setcurrentPageInBarManual suggestion
  413.   global oStoryteller, oPuppeteer, gOriginPoint
  414.   cursorOff()
  415.   set frameStack to getProp(the lsMultiFrames of oPuppeteer, #BarManual)
  416.   set pageList to [0, 1, 2, 3, 4, 5]
  417.   set currentPage to getState(oStoryteller, #currentPageInBarManual)
  418.   set bookMark to getPos(pageList, currentPage)
  419.   if suggestion = #next then
  420.     if bookMark = count(pageList) then
  421.       setState(oStoryteller, #playerIsReadingBarManual, 0)
  422.       updateDisplay(oPuppeteer)
  423.     else
  424.       set pageSprite to 0
  425.       set shadowSprite to 0
  426.       repeat with guess = 10 to 48
  427.         if getPos(frameStack, the castNum of sprite guess) then
  428.           set shadowSprite to guess
  429.           set pageSprite to guess + 1
  430.           exit repeat
  431.         end if
  432.       end repeat
  433.       set myLocation to the loc of sprite pageSprite
  434.       set the castNum of sprite shadowSprite to the castNum of sprite pageSprite
  435.       set the loc of sprite pageSprite to point(300, -300) + gOriginPoint
  436.       updateStage()
  437.       do("puppetTransition " & getProp(getProp(the lsMachineProfile of oPuppeteer, #transitions), #nextPage))
  438.       setProp(the lsStateData of oStoryteller, #currentPageInBarManual, list(getAt(pageList, bookMark + 1)))
  439.       set the castNum of sprite pageSprite to getAt(frameStack, bookMark + 3)
  440.       set the loc of sprite pageSprite to myLocation
  441.       soundEffect(#pageTurn)
  442.       updateStage()
  443.     end if
  444.   end if
  445.   if suggestion = #previous then
  446.     if bookMark = 1 then
  447.       setState(oStoryteller, #playerIsReadingBarManual, 0)
  448.       updateDisplay(oPuppeteer)
  449.     else
  450.       set pageSprite to 0
  451.       set shadowSprite to 0
  452.       repeat with guess = 10 to 48
  453.         if getPos(frameStack, the castNum of sprite guess) then
  454.           set shadowSprite to guess
  455.           set pageSprite to guess + 1
  456.           exit repeat
  457.         end if
  458.       end repeat
  459.       set myLocation to the loc of sprite pageSprite
  460.       set the castNum of sprite shadowSprite to the castNum of sprite pageSprite
  461.       set the loc of sprite pageSprite to point(300, -300) + gOriginPoint
  462.       updateStage()
  463.       do("puppetTransition " & getProp(getProp(the lsMachineProfile of oPuppeteer, #transitions), #prevPage))
  464.       setProp(the lsStateData of oStoryteller, #currentPageInBarManual, list(getAt(pageList, bookMark - 1)))
  465.       set the castNum of sprite pageSprite to getAt(frameStack, bookMark + 1)
  466.       set the loc of sprite pageSprite to myLocation
  467.       soundEffect(#pageTurn)
  468.       updateStage()
  469.     end if
  470.   end if
  471. end
  472.  
  473. on setplayerIsReadingBarManual suggestion
  474.   global oStoryteller, oPuppeteer
  475.   setProp(the lsStateData of oStoryteller, #currentPageInBarManual, [0])
  476.   setProp(the lsStateData of oStoryteller, #playerIsReadingBarManual, list(suggestion))
  477.   if suggestion = 1 then
  478.     setTransition(oPuppeteer, #fadeIn)
  479.   else
  480.     setTransition(oPuppeteer, #fadeIn)
  481.   end if
  482. end
  483.  
  484. on setcurrentPageInDiary suggestion
  485.   global oStoryteller, oPuppeteer, gOriginPoint
  486.   cursorOff()
  487.   set frameStack to getProp(the lsMultiFrames of oPuppeteer, #dreamDiary)
  488.   set pageList to [1, 2, 3, 5, 6]
  489.   set currentPage to getState(oStoryteller, #currentPageInDiary)
  490.   set bookMark to getPos(pageList, currentPage)
  491.   if suggestion = #next then
  492.     if bookMark = count(pageList) then
  493.       setState(oStoryteller, #playerIsReadingDreamDiary, 0)
  494.       updateDisplay(oPuppeteer)
  495.     else
  496.       set pageSprite to 0
  497.       set shadowSprite to 0
  498.       repeat with guess = 10 to 48
  499.         if getPos(frameStack, the castNum of sprite guess) then
  500.           set shadowSprite to guess
  501.           set pageSprite to guess + 1
  502.           exit repeat
  503.         end if
  504.       end repeat
  505.       set myLocation to the loc of sprite pageSprite
  506.       set the castNum of sprite shadowSprite to the castNum of sprite pageSprite
  507.       set the loc of sprite pageSprite to point(300, -300) + gOriginPoint
  508.       updateStage()
  509.       do("puppetTransition " & getProp(getProp(the lsMachineProfile of oPuppeteer, #transitions), #nextPage))
  510.       setProp(the lsStateData of oStoryteller, #currentPageInDiary, list(getAt(pageList, bookMark + 1)))
  511.       set the castNum of sprite pageSprite to getAt(frameStack, bookMark + 3)
  512.       set the loc of sprite pageSprite to myLocation
  513.       soundEffect(#pageTurn)
  514.       updateStage()
  515.     end if
  516.   end if
  517.   if suggestion = #previous then
  518.     if bookMark = 1 then
  519.       setState(oStoryteller, #playerIsReadingDreamDiary, 0)
  520.       updateDisplay(oPuppeteer)
  521.     else
  522.       set pageSprite to 0
  523.       set shadowSprite to 0
  524.       repeat with guess = 10 to 48
  525.         if getPos(frameStack, the castNum of sprite guess) then
  526.           set shadowSprite to guess
  527.           set pageSprite to guess + 1
  528.           exit repeat
  529.         end if
  530.       end repeat
  531.       set myLocation to the loc of sprite pageSprite
  532.       set the castNum of sprite shadowSprite to the castNum of sprite pageSprite
  533.       set the loc of sprite pageSprite to point(300, -300) + gOriginPoint
  534.       updateStage()
  535.       do("puppetTransition " & getProp(getProp(the lsMachineProfile of oPuppeteer, #transitions), #prevPage))
  536.       setProp(the lsStateData of oStoryteller, #currentPageInDiary, list(getAt(pageList, bookMark - 1)))
  537.       set the castNum of sprite pageSprite to getAt(frameStack, bookMark + 1)
  538.       set the loc of sprite pageSprite to myLocation
  539.       soundEffect(#pageTurn)
  540.       updateStage()
  541.     end if
  542.   end if
  543. end
  544.  
  545. on setplayerIsReadingDreamDiary suggestion
  546.   global oStoryteller, oPuppeteer
  547.   setProp(the lsStateData of oStoryteller, #currentPageInDiary, [1])
  548.   setProp(the lsStateData of oStoryteller, #playerIsReadingDreamDiary, list(suggestion))
  549.   if suggestion = 1 then
  550.     setTransition(oPuppeteer, #fadeIn)
  551.   else
  552.     setTransition(oPuppeteer, #fadeIn)
  553.   end if
  554. end
  555.